import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
/*===================组织机构==================*/
import Department from './views/org/department.vue'
import Employee from './views/org/employee.vue'
import Shop from './views/org/shop.vue'
import ShopEnter from './views/shopEnter.vue'
import Active from './views/active.vue'
/*===================组织机构==================*/
/*===================车辆管理==================*/
import CarType from './views/car/carType.vue'
import Car from './views/car/car.vue'
/*===================车辆管理==================*/
/*===================系统配置==================*/
import Config from './views/sysmanage/config.vue'
import Dictionary from './views/sysmanage/dictionary.vue'
import Dictionaryitem from './views/sysmanage/dictionaryitem.vue'
/*===================系统配置==================*/
/*===================产品管理==================*/
import ProductType from './views/product/productType.vue'
import Product from './views/product/product.vue'
/*===================产品管理==================*/
/*===================营销管理==================*/
import Activity from './views/market/activity.vue'
import Activity_remark from './views/market/activity_remark.vue'
import Business from './views/market/business.vue'
import Business_product from './views/market/business_product.vue'
import Business_remark from './views/market/business_remark.vue'
import Clue from './views/market/clue.vue'
import Clue_remark from './views/market/clue_remark.vue'
/*===================营销管理==================*/
/*===================订单管理==================*/
import Contract from './views/order/contract.vue'
import Contract_remark from './views/order/contract_remark.vue'
import Order from './views/order/order.vue'
import Order_product from './views/order/order_product.vue'
/*===================订单管理==================*/
/*===================售后管理==================*/
import Customer from './views/aftermarket/customer.vue'
import Guarantee from './views/aftermarket/guarantee.vue'
import Guarantee_item from './views/aftermarket/guarantee_item.vue'
/*===================售后管理==================*/
/*===================财务管理==================*/
import Deposit from './views/finance/deposit.vue'
import Receivables from './views/finance/receivables.vue'
import Receivables_item from './views/finance/receivables_item.vue'
import Receivables_remark from './views/finance/receivables_remark.vue'
/*===================财务管理==================*/
let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    //携带参数 后面就是携带的店铺的id
    {
        path: '/active/:id',
        component: Active,
        name: '',
        hidden: true
    },
    {
        path: '/shopEnter',
        component: ShopEnter,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '主页',
        iconCls: 'fa fa-bar-chart',
        leaf: true,//只有一个节点
        children: [
            { path: '/echarts', component: echarts, name: '主页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Employee, name: '员工管理'},
            { path: '/shop', component: Shop, name: '商铺管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '车辆管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/carType', component: CarType, name: '车辆类型'},
            { path: '/car', component: Car, name: '车辆管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统配置管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: "/config", component: Config, name: "系统配置"},
            { path: "/dictionary", component: Dictionary, name: "数据字典"},
            { path: "/dictionaryitem", component: Dictionaryitem, name: "字典明细"},
            { path: '/page4', component: Order, name: '页面4' },
            { path: '/page5', component: Order_product, name: '页面5' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: "/productType", component: ProductType, name: "产品类型"},
            { path: "/product", component: Product, name: "产品列表"}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '营销管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: "/activity", component: Activity, name: "活动列表"},
            { path: "/activity_remark", component: Activity_remark, name: "活动备注"},
            { path: "/business", component: Business, name: "商机列表"},
            { path: "/business_product", component: Business_product, name: "商机产品"},
            { path: "/business_remark", component: Business_remark, name: "商机备注"},
            { path: "/clue", component: Clue, name: "线索列表"},
            { path: "/clue_remark", component: Clue_remark, name: "线索备注"}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单模块',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/contract', component: Contract, name: '合同列表' },
            { path: '/contract_remark', component: Contract_remark, name: '合同备注' },
            { path: '/order', component: Order, name: '订单列表' },
            { path: '/order_product', component: Order_product, name: '订单产品' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '售后模块',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/customer', component: Customer, name: '客户列表' },
            { path: '/guarantee', component: Guarantee, name: '售后保障' },
            { path: '/guarantee_item', component: Guarantee_item, name: '售后明细' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '财务模块',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/deposit', component: Deposit, name: '存款信息' },
            { path: '/receivables', component: Receivables, name: '应收款' },
            { path: '/receivables_item', component: Receivables_item, name: '收款明细' },
            { path: '/receivables_remark', component: Receivables_remark, name: '收款备注' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;